`timescale 1ns/10ps  //1ns为时间单位 10ps为精度

//反相器设计
module inv(A,Y);
    input A;
    output Y;

    assign Y = ~A;

endmodule

//testbench of inv 
module inv_tb;
    reg aa;
    wire yy;

    inv inv(.A(aa),.Y(yy));

    initial begin
            aa <=0;
//#10表示过10个时间单位
        #10 aa <=1;
        #10 aa <=0;
        #10 aa <=1; 
        #10 $stop;  //停止
    end
endmodule